'use strict'

let Koa = require('koa');
let static = require('koa-static');
let bodyparser = require('koa-bodyparser')
let temp = require('./templating');
let contro = require('./controllers');

let app = new Koa();

app.use(bodyparser());

app.use(temp)

app.use(contro());

app.use(static(__dirname+'/static'));

app.use(async(ctx,next)=>{
    ctx.render('hello.html');
});

let port = 3000;

app.listen(port);

console.log(`http://127.0.0.1:${port}`);